package ru.nsu.fit.client.core;

import java.util.ArrayList;

public class Question implements IQuestion {
    private String text = null;
    private int id = 0;
    private ArrayList<String> cases = null;
    private ArrayList<Integer> caseIds = null;
    private long timeBegin = 0, timeEnd = 0;
    private long lifetime = 0;

    public Question(final int id, final String text, final int lifetime)
    {
        this.id = id;
        this.text = text;
        this.timeBegin = System.currentTimeMillis();
        this.timeEnd = timeBegin + lifetime;
        this.lifetime = lifetime;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public int getQuestionId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public final ArrayList<String> getCases() {
        return cases;
    }

    public void setCases(ArrayList<String> cases) {
        this.cases = cases;
    }

    public long getTimeBegin() {
        return timeBegin;
    }

    public void setTimeBegin(long timeBegin) {
        this.timeBegin = timeBegin;
    }

    public long getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(long timeEnd) {
        this.timeEnd = timeEnd;
    }

    public ArrayList<Integer> getCaseIds() {
        return caseIds;
    }

    public void setCaseIds(ArrayList<Integer> caseIds) {
        this.caseIds = caseIds;
    }

    @Override
    public long getLifetime() {
        return lifetime;
    }

    @Override
    public void setLifetime(long lifetime) {
        this.lifetime = lifetime;
    }
}
